<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>   
 


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
	<script type="text/javascript" src="js/showAll.js"></script>
  </head>
  
  <body>
    <div id="all">
    	<h2>中国联通网上营业厅</h2>
    	<p>
    		<a class="fr" href="showAll.action">[我的资费]</a>
    		<a class="fr" href="shuoming.jsp">[资费说明]</a>
    		<span class="fr">手机号为${user.no }的用户，欢迎您！</span>
    	</p>
    	<h3>我的资费（${user.type }类套餐）</h3>
    	<div id="fun">
    	<table border="1" cellspacing="0">
    		<tr>
    			<th>年</th>
    			<th>月</th>
    			<th>通话时长（分钟）</th>
    			<th>短信条数</th>
    			<th>上网流量（MB）</th>
    			<th>费用（元）</th>
    			<th>账单日期</th>
    		</tr>
    		
    		<c:forEach var="bill" items="${billsList }">
    			<tr>
    				<td>${bill.year }</td>
    				<td>${bill.month }</td>
    				<td>${bill.telPeriod }</td>
    				<td>${bill.messageNum }</td>
    				<td>${bill.internetTraffic }</td>
    				<td><fmt:formatNumber type="number" value="${bill.totalAmount }" pattern="0.000" maxFractionDigits="3"/></td>
    				<td>${bill.billDate }</td>
    			</tr>
    		</c:forEach>
    	</table>
		<p class="ppage">
		当前页数[<span id="currPage">${page.currPage }</span>/<span id="sumPage">${page.sumPage }</span>]&nbsp;&nbsp;&nbsp;&nbsp;
		<span class="pages">首页</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="pages">上一页</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="pages">下一页</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="pages">尾页</span>
		</p>
		</div>
    </div>
  </body>
</html>
